#pragma once
#include <qapplication.h>
#include <iostream>
#include <set>
#include <qthread.h>
#include <qfileinfo.h>
#include <qregexp.h>
#include "config.h"
class FileCopyWorker: public QThread
{
	Q_OBJECT
public:
	FileCopyWorker(QObject* parent);
	~FileCopyWorker();
	void HandleFileOrDir();
	void FileToBakDir(QString srcPath, QFileInfo srcInfo, QString dstDir);
	void init(configure& conf);
	bool IsExcludeFile(QString srcFileDir, std::set<QString>& excludeFDList);


signals:
	void updateUINumbers(qint64, qint64, qint64, qint64);
protected:
	void run();
	configure* m_configure;

private:
	std::set<QString>  srcFileList;
	std::set<QString>  excludeFileList;
	QString dstDir;
};
